<div class="draw-grid">
    <el-button size="mini" type="text" icon="el-icon-edit-outline" @click="toDraw">
        绘制网格
    </el-button>
    <el-dialog :close-on-click-modal="false" :title="'绘制网格：'+ title" :visible.sync="open" width="100%" append-to-body class="draw-grid_dialog">
      <div slot="title" class="grid-header">
      	<div class="title">绘制网格：{{title}}</div>
      	<div class="close" @click="open = false">退出绘制</div>
      </div>
        <div id="comparison-container" v-if="open">
            <div id="before" class="map-item"></div>
            <div id="after" class="map-item"></div>
        </div>
        <el-button-group class="options" v-permission="dataPermission">
            <el-button type="primary" class="draw" @click="drawMain" :disabled="[2].indexOf(drawStatus) === -1">
                绘制网格
            </el-button>
            <el-button type="primary" class="draw" @click="drawSub" :disabled="[3].indexOf(drawStatus) === -1">
                绘制飞地
            </el-button>
            <el-button type="primary" class="draw" @click="cutSub" :disabled="[3].indexOf(drawStatus) === -1">
                绘制内环
            </el-button>
        </el-button-group>
        <el-button-group class="options-edit" v-permission="dataPermission">
            <el-button type="warning" class="draw" @click="editMain" :disabled="[3].indexOf(drawStatus) === -1">
                编辑网格
            </el-button>
            <el-button type="warning" class="draw" @click="setCenter" :disabled="[2, 3].indexOf(drawStatus) === -1">
                中心坐标
            </el-button>
            <el-button type="warning" class="draw" @click="saveDraw" :disabled="[1].indexOf(drawStatus) === -1">
                保存绘制
            </el-button>
        </el-button-group>
        <el-button-group class="options-center" v-permission="dataPermission">
            <el-button type="danger" class="draw" @click="delDraw" :disabled="[3].indexOf(drawStatus) === -1">
                删除网格
            </el-button>
            <el-button type="danger" class="draw" @click="delSub" :disabled="[3].indexOf(drawStatus) === -1">
                删除飞地
            </el-button>
            <el-button type="danger" class="draw" @click="delCut" :disabled="[3].indexOf(drawStatus) === -1">
                删除内环
            </el-button>
        </el-button-group>
    </el-dialog>
</div>
